package managedbeans;

import java.io.Serializable;

import org.eclnt.editor.annotations.CCGenClass;
import org.eclnt.workplace.IWorkpageDispatcher;

import togglz.MyFeatures;

@CCGenClass (expressionBase="#{d.PageOnePB}")

public class PageOnePB
    extends WorkpageDispatchedPageBean 
    implements Serializable
{

    public String getFeature() { 
    	StringBuilder sb = new StringBuilder();
    	if(MyFeatures.FEATURE_ONE.isActive()) {
    		sb.append("Feature ONE is active");
    	} else {
    		sb.append("Feature ONE is not active");
    	}
    	sb.append(" - ");
    	if(MyFeatures.FEATURE_TWO.isActive()) {
    		sb.append("Feature TWO is active");
    	} else {
    		sb.append("Feature TWO is not active");
    	}
    	
    	return sb.toString();
    }


    // ------------------------------------------------------------------------
    // constructors & initialization
    // ------------------------------------------------------------------------

    public PageOnePB(IWorkpageDispatcher workpageDispatcher)
    {
        super(workpageDispatcher);        
    }
    
    public String getPageName() { return "/page1.jsp"; }
    public String getRootExpressionUsedInPage() { return "#{d.PageOnePB}"; }
    
    // ------------------------------------------------------------------------
}
